<template>
  <div id="home">
    <a-layout id="components-layout-demo-custom-trigger">
      <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
        <div class="logo" />
        <TheSideBar></TheSideBar>
      </a-layout-sider>

      <a-layout>
        <a-layout-header style="background: #f8f8f8; padding: 0">
          <a-icon
            class="trigger"
            :type="collapsed ? 'menu-unfold' : 'menu-fold'"
            @click="() => (collapsed = !collapsed)"
          />
        </a-layout-header>
        <a-layout-content
          :style="{
            margin: '24px 16px',
            padding: '24px',
            background: '#fff',
            minHeight: '280px',
          }"
        >
          <router-view></router-view>
        </a-layout-content>
      </a-layout>
    </a-layout>
  </div>
</template>

<script>
import TheSideBar from '@/components/TheSideBar/TheSideBar';
export default {


  data() {
    return {
      collapsed: false,
    };
  },
  components: {
    TheSideBar,
  },
};
</script>

<style lang="scss" scoped>
#home {
  height: 100%;
  .ant-layout {
    min-height: 100%;
  }
  .ant-layout-header {
    box-shadow: $vue-box-shadow-header;
  }
  .ant-layout-sider {
    background-color: $vue-color-primary;
  }
  .ant-menu-dark {
    background-color: $vue-color-primary;
  }
}
#components-layout-demo-custom-trigger {
  .trigger {
    font-size: 18px;
    line-height: 64px;
    padding: 0 24px;
    cursor: pointer;
    transition: color 0.3s;
    &.trigger:hover {
      color: $vue-color-primary;
    }
  }
  .logo {
    height: 32px;
    background: #ffedce;
    margin: 16px;
  }
}
</style>
